//
//  XZLTCell.m
//  生活小助手
//
//  Created by lixiangzhou on 14-8-9.
//  Copyright (c) 2014年 lxz. All rights reserved.
//

#import "XZLTCell.h"
#import "XZLTTrain.h"

@interface XZLTCell ()
/*车次*/
@property (weak, nonatomic) IBOutlet UILabel *trainNoLabel;
/*始发-》终点信息*/
@property (weak, nonatomic) IBOutlet UILabel *fromToLabel;
/*历时*/
@property (weak, nonatomic) IBOutlet UILabel *lishiLabel;
/*硬座*/
@property (weak, nonatomic) IBOutlet UILabel *yzLabel;
/*硬卧*/
@property (weak, nonatomic) IBOutlet UILabel *ywLabel;
/*无座*/
@property (weak, nonatomic) IBOutlet UILabel *wzLabel;
/*一等座*/
@property (weak, nonatomic) IBOutlet UILabel *zyLabel;
/*二等座*/
@property (weak, nonatomic) IBOutlet UILabel *zeLabel;
/*商务座*/
@property (weak, nonatomic) IBOutlet UILabel *swzLabel;
/*软座*/
@property (weak, nonatomic) IBOutlet UILabel *rzLabel;
/*软卧*/
@property (weak, nonatomic) IBOutlet UILabel *rwLabel;
/*特等座*/
@property (weak, nonatomic) IBOutlet UILabel *tzLabel;
/*高级软卧：-- 说明无该席位*/
@property (weak, nonatomic) IBOutlet UILabel *grLabel;
/*其他*/
@property (weak, nonatomic) IBOutlet UILabel *qtLabel;
@end

@implementation XZLTCell

+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *identifier = @"stsCell";
    XZLTCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell) {
        cell = [[NSBundle mainBundle] loadNibNamed:@"XZLTCell" owner:nil options:nil][0];
    }
    return cell;
}

- (void)setTrain:(XZLTTrain *)train
{
    _train = train;
    
    self.trainNoLabel.text = train.train_no;
    self.fromToLabel.text = [NSString stringWithFormat:@"%@(%@)- %@(%@)", train.from_station_name, train.start_time, train.end_station_name, train.arrive_time];
    self.lishiLabel.text = train.lishi;
    self.yzLabel.text = train.yz_num;
    self.ywLabel.text = train.yw_num;
    self.wzLabel.text = train.wz_num;
    self.zyLabel.text = train.zy_num;
    self.zeLabel.text = train.ze_num;
    self.swzLabel.text = train.traiswz_numn_no;
    self.rzLabel.text = train.rz_num;
    self.rwLabel.text = train.rw_num;
    self.tzLabel.text = train.tz_num;
    self.grLabel.text = train.gr_num;
    self.qtLabel.text = train.qt_num;
}

@end
